/* 现代化武汉大学官网样式 */
:root {
    --primary-color: #1E3A7B;
    --primary-dark: #152a5e;
    --primary-light: #2a4da0;
    --secondary-color: #d4af37;
    --accent-color: #e74c3c;
    --text-dark: #333333;
    --text-light: #666666;
    --text-lighter: #999999;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #eaeaea;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --radius: 8px;
    --transition: all 0.3s ease;
}

/* 重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部通知栏 */
.top-notice {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.top-notice .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-links a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-size: 13px;
    opacity: 0.9;
    transition: var(--transition);
}

.top-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* 头部样式 */
header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 60px;
    width: auto;
}

.logo-text h1 {
    font-size: 28px;
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 4px;
}

.logo-text p {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 500;
}

/* 搜索框和工具区域 */
.header-tools {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    display: flex;
    background: var(--bg-light);
    border-radius: 25px;
    padding: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(30, 58, 123, 0.1);
}

.search-box input {
    border: none;
    background: none;
    padding: 0 12px;
    width: 250px;
    outline: none;
    font-size: 14px;
}

.search-box button {
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--primary-dark);
}

.user-actions {
    display: flex;
    gap: 12px;
}

.auth-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.auth-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.auth-btn.secondary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.auth-btn.secondary:hover {
    background: var(--primary-color);
    color: white;
}

/* 主导航 */
.main-nav {
    background: var(--primary-color);
    position: relative;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 16px 20px;
    display: block;
    font-size: 16px;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    background: var(--primary-light);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 3px;
    background: var(--secondary-color);
}

/* 下拉菜单 */
.nav-dropdown {
    position: relative;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius) var(--radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.dropdown-menu a:last-child {
    border-bottom: none;
}

/* 轮播图 */
.hero-banner {
    position: relative;
    margin-bottom: 40px;
}

.carousel-container {
    position: relative;
    height: 500px;
    overflow: hidden;
    border-radius: 0 0 var(--radius) var(--radius);
}

.carousel {
    display: flex;
    height: 100%;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    height: 100%;
}

.banner-placeholder {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
}

.banner-content {
    text-align: center;
    z-index: 2;
}

.banner-content h2 {
    font-size: 48px;
    margin-bottom: 16px;
    font-weight: bold;
}

.banner-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.banner-btn {
    background: var(--secondary-color);
    color: var(--text-dark);
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.banner-btn:hover {
    background: #c19b2c;
    transform: translateY(-2px);
}

.banner-marker {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
}

/* 轮播控制 */
.carousel-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.carousel-prev,
.carousel-next {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
    -webkit-backdrop-filter: blur(10px); /* 兼容 Safari */
    backdrop-filter: blur(10px);
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
}

.indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    margin: 0 6px;
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background: white;
    transform: scale(1.2);
}

/* 快速服务 */
.quick-services {
    padding: 60px 0;
    background: var(--bg-light);
}

.section-title {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 40px;
    font-weight: bold;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--secondary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-top: 40px;
}

.service-card {
    background: white;
    padding: 30px 20px;
    border-radius: var(--radius);
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    color: var(--primary-color);
}

.service-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.service-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    font-weight: 600;
}

.service-card p {
    color: var(--text-light);
    font-size: 14px;
}

/* 新闻区域 */
.news-section {
    padding: 60px 0;
}

.news-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.more-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.more-link:hover {
    color: var(--primary-dark);
}

/* 新闻列表 */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.news-item {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.news-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.news-item.featured {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    align-items: start;
}

.news-image {
    position: relative;
}

.image-placeholder {
    background: var(--bg-light);
    border-radius: var(--radius);
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-lighter);
    border: 2px dashed var(--border-color);
}

.news-content h3 {
    margin-bottom: 12px;
    font-size: 18px;
    line-height: 1.4;
}

.news-content h3 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.news-content h3 a:hover {
    color: var(--primary-color);
}

.news-content p {
    color: var(--text-light);
    margin-bottom: 16px;
    line-height: 1.6;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-lighter);
}

.news-tag {
    background: var(--primary-color);
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

/* 通知公告 */
.notice-list {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.notice-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.notice-item:last-child {
    border-bottom: none;
}

.notice-item:hover {
    background: var(--bg-light);
}

.notice-item a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
}

.notice-item.urgent .notice-title {
    color: var(--accent-color);
    font-weight: 600;
}

.notice-date {
    color: var(--text-lighter);
    font-size: 14px;
    white-space: nowrap;
}

/* 学术活动 */
.events-section {
    margin-top: 40px;
}

.sub-section-title {
    font-size: 20px;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 600;
}

.events-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.event-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.event-date {
    background: var(--primary-color);
    color: white;
    padding: 12px;
    border-radius: var(--radius);
    text-align: center;
    min-width: 60px;
}

.date-day {
    display: block;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
}

.date-month {
    display: block;
    font-size: 12px;
    margin-top: 4px;
}

.event-info h4 {
    margin-bottom: 4px;
    font-size: 16px;
}

.event-info h4 a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.event-info h4 a:hover {
    color: var(--primary-color);
}

.event-info p {
    color: var(--text-light);
    font-size: 14px;
}

/* 数字统计 */
.stats-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    text-align: center;
}

.stats-section .section-title {
    color: white;
}

.stats-section .section-title::after {
    background: var(--secondary-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.stat-item {
    padding: 30px 20px;
}

.stat-number {
    font-size: 48px;
    font-weight: bold;
    margin-bottom: 12px;
    color: var(--secondary-color);
}

.stat-label {
    font-size: 18px;
    opacity: 0.9;
}

/* 底部样式 */
footer {
    background: var(--text-dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--secondary-color);
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--secondary-color);
}

.contact-info p {
    margin-bottom: 12px;
    opacity: 0.8;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: block;
}

.footer-links a:hover {
    color: white;
    transform: translateX(5px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo img {
    height: 40px;
    width: auto;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-text strong {
    font-size: 18px;
    color: white;
}

.logo-text span {
    font-size: 12px;
    opacity: 0.7;
}

.copyright {
    text-align: right;
    opacity: 0.7;
    font-size: 14px;
}

.copyright p {
    margin-bottom: 4px;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    -webkit-backdrop-filter: blur(5px); /* 兼容 Safari */
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: var(--radius);
    width: 100%;
    max-width: 400px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    transition: var(--transition);
}

.close:hover {
    color: var(--text-dark);
}

.modal-content h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-size: 24px;
}

.login-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-light);
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(30, 58, 123, 0.1);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-light);
    cursor: pointer;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--primary-dark);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.login-btn:hover {
    background: var(--primary-dark);
}

.login-footer {
    margin-top: 20px;
    text-align: center;
}

.login-footer p {
    color: var(--text-light);
    font-size: 13px;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .news-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .carousel-container {
        height: 400px;
    }
    
    .banner-content h2 {
        font-size: 36px;
    }
}

@media (max-width: 768px) {
    .header-main {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .header-tools {
        flex-direction: column;
        width: 100%;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-link {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .carousel-container {
        height: 300px;
    }
    
    .banner-content h2 {
        font-size: 28px;
    }
    
    .banner-content p {
        font-size: 16px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .news-item.featured {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .modal-content {
        margin: 20px;
        padding: 30px 20px;
    }
}

/* 超大下拉菜单样式 */
.mega-menu {
    width: 280px;
    left: 0;
    padding: 0 !important;
    border-radius: 0 0 var(--radius) var(--radius);
    overflow: hidden;
}

.mega-menu-content {
    padding: 20px;
}

.menu-column h4 {
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--secondary-color);
}

.menu-column a {
    display: block;
    padding: 8px 0;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.menu-column a:hover {
    color: var(--primary-color);
    padding-left: 8px;
    border-bottom-color: var(--border-color);
}

.menu-column a:last-child {
    border-bottom: none;
}

/* 导航下拉菜单动画增强 */
.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    animation: dropdownFadeIn 0.3s ease;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端导航改进 */
@media (max-width: 768px) {
    .mega-menu {
        width: 100%;
        position: static;
        box-shadow: none;
        border-radius: 0;
        border: none;
        border-top: 1px solid var(--border-color);
    }
    
    .mega-menu-content {
        padding: 15px;
    }
    
    .menu-column h4 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    
    .menu-column a {
        font-size: 13px;
        padding: 6px 0;
    }
}